import request from "@/utils/request";

/**
 * 登录
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function reqLogin(data) {
    return request({
        url:'/userLogin',
        method:'post',
        data
    })
}

/**
 * 退出登录
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function reqLogout() {
    return request({
        url:'/userLogout',
        method:'post',
    })
}

/**
 * 获取用户信息
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function reqUserInfo() {
    return request({
        url:'/user/info',
        method:'post',
    })
}

/**
 * 获取验证码
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function reqCaptcha() {
    return request({
        url:'/captcha',
        method:'get',
    })
}
